/************************************************************
 * Project Name         [Thinking_In_Java]
 * File Name            [NotepadLauncher.java]
 * Creation Date        [11-Jul-2014]
 * 
 * Copyright© ge.y.yang@gmail.com All Rights Reserved
 * 
 * Work hard, play harder, think big and keep fit
 ************************************************************/
package pkg_02_gui.notepad_V1.launcher;

import java.awt.EventQueue;
import java.awt.Font;

import javax.swing.JFrame;
import javax.swing.UIManager;

import pkg_02_gui.notepad_V1.ui.main.NotepadFrame;

/**
 * 
 * @author 不落的太阳(Sean Yang)
 * @version 1.0
 * @since JDK 6
 * 
 */
public class NotepadLauncher {

	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			@Override
			public void run() {
				try {
					String LAF = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
					UIManager.setLookAndFeel(LAF);
					Font font = new Font("Dialog", Font.PLAIN, 12); // 改变默认的组建上显示的字体,

					// 美化界面
					UIManager.put("MenuBar.font", font);
					UIManager.put("MenuItem.font", font);
					UIManager.put("Menu.font", font);
					UIManager.put("PopupMenu.font", font);
					UIManager.put("ToolBar.font", font);
					UIManager.put("ToolTip.font", font);
					UIManager.put("TabbedPane.font", font);
					UIManager.put("Label.font", font);
					UIManager.put("List.font", font);
					UIManager.put("ComboBox.font", font);
					UIManager.put("Button.font", font);
					UIManager.put("Table.font", font);
					UIManager.put("TableHeader.font", font);
					UIManager.put("Tree.font", font);
					UIManager.put("TextField.font", font);
					UIManager.put("TextArea.font", font);
					UIManager.put("TitledBorder.font", font);
					UIManager.put("OptionPane.font", font);
					UIManager.put("RadioButton.font", font);
					UIManager.put("CheckBox.font", font);
					UIManager.put("ToggleButton.font", font);
					UIManager.put("Dialog.font", font);
					UIManager.put("Panel.font", font);
				} catch (Exception e) {
				}

				NotepadFrame frame = new NotepadFrame("我的记事本");
				frame.setVisible(true);
				frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			}
		});
	}
}
